var resConfig = require(_rConfig.basePath + '/config/response').config;

exports.run = function(status, data, res){

	function _getHeaders(data) {
		var headers = {};
		headers['Server'] = _rConfig.serverName;
		headers['Content-Type'] = 'application/json';
		headers['Content-Length'] = data.length;
		headers['Connection'] = 'close';

		return headers;

	}
	
	var headers = _getHeaders(data);

	res.writeHead(status, headers);
	res.write(data);
	res.end();
}